﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StaffInput.ascx.cs"
    Inherits="MvcApplication5.Views.Master.StaffInput" %>
<script src="../../../Scripts/Master/Control/StaffInput.js" type="text/javascript"></script>
<script src="../../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
<div id="addStaffInputFrame" style="width: 400px; height: 200px; background-color: White;
    display: none;">
    <div id="ctlFrame" style="width: 400px; height: 170px; margin: center;">
        <table class="datatable" width="97%" height="95%" cellpadding="0" cellspacing="0"
            style="margin: 5px 0 0 5px">
            <tr>
                <th width="30%">
                    姓名
                </th>
                <td>
                    <span class="mustinput">
                        <input type="text" id="staff_name" runat="server" style="width: 120px;" />
                    </span>
                </td>
            </tr>
            <tr>
                <th width="30%">
                    职位
                </th>
                <td>
                    <span class="mustinput">
                        <select id="position_id" runat="server" style="width: 120px;">
                        </select>
                    </span>
                </td>
            </tr>
            <tr>
                <th width="30%">
                    帐号
                </th>
                <td>
                    <span class="mustinput">
                        <input type="text" id="staff_code" runat="server" style="width: 120px;" />
                    </span>
                </td>
            </tr>
            <tr>
                <th width="30%">
                    密码
                </th>
                <td>
                    <span class="mustinput">
                        <input type="text" id="staff_password" runat="server" style="width: 120px;" />
                    </span>
                </td>
            </tr>
            <tr>
                <th width="30%">
                    生日
                </th>
                <td>
                    <span class="mustinput">
                        <input class="Wdate" type="text" id="birth_date" runat="server" style="width: 120px;"
                            targetformat="yyyy-MM-dd" onclick="WdatePicker()">
                    </span>
                </td>
            </tr>
        </table>
    </div>
    <div style="text-align: right; clear: both; margin: 5px 8px">
        <img src="../../Content/images/button/btn_save.png" id="btnSave" runat="server" style="cursor: pointer" />
        <img src="../../Content/images/button/btn_delete.png" id="btnDelete" runat="server"
            style="cursor: pointer" />
        <img src="../../Content/images/button/btn_clear.png" id="btnClear" runat="server"
            style="cursor: pointer" />
        <img src="~/Content/images/button/btn_close.png" id="btnClose" runat="server" style="cursor: pointer" />
    </div>
    <input type="hidden" id="staff_id" runat="server" />
</div>
<script type="text/javascript">
        var staffInputIns = null;
    function StaffInput_<%= this.ClientID %>_Page_Load(){

        <%= GetJSInstance()%> = new StaffInput();

        staffInputIns = <%= GetJSInstance()%>;

        staffInputIns.dom.clientID           = "<%= this.ClientID %>";
        staffInputIns.dom.staff_id           = "<%= staff_id.ClientID %>";
        staffInputIns.dom.staff_code         = "<%= staff_code.ClientID %>";
        staffInputIns.dom.staff_password     = "<%= staff_password.ClientID %>";
        staffInputIns.dom.staff_name         = "<%= staff_name.ClientID %>";
        staffInputIns.dom.birth_date         = "<%= birth_date.ClientID %>";
        staffInputIns.dom.position_id        = "<%= position_id.ClientID %>";

        staffInputIns.dom.btnSave            = "<%= btnSave.ClientID %>";
        staffInputIns.dom.btnDelete          = "<%= btnDelete.ClientID %>";
        staffInputIns.dom.btnClear           = "<%= btnClear.ClientID %>";
        staffInputIns.dom.btnClose           = "<%= btnClose.ClientID %>";

        staffInputIns.init();
   }

    StaffInput_<%= this.ClientID %>_Page_Load();
</script>
